import { createWebHashHistory, createRouter } from 'vue-router'

import Home from './views/Home.vue'
import Doc from './views/Doc.vue'
import DocHome from './views/DocHome.vue'
import SwitchExample from './gallery/SwitchExample.vue'
import ButtonExample from './gallery/ButtonExample.vue'
import ModalExample from './gallery/ModalExample.vue'
import TabExample from './gallery/TabExample.vue'

const history = createWebHashHistory()
export const router = createRouter({
  history,
  routes: [
    { path: '/', component: Home },
    { path: '/doc', component: Doc, children: [
      { path: '', component: DocHome },
      { path: 'switch', component: SwitchExample },
      { path: 'button', component: ButtonExample },
      { path: 'modal', component: ModalExample },
      { path: 'tabs', component: TabExample },
    ] },
  ],
})